In computer processing, a cursor is a symbol, such as an arrow or line, that is displayed on the screen at a specified location. In both text and graphics computer displays, the role of the cursor is to indicate an active location on the display screen. Despite this functional similarity, however, text mode and graphics mode cursors are created differently. Unlike text mode cursors in alphanumeric cell displays, which are hardware controlled, cursors in graphics systems are software created.
There are a number of conventions for showing a cursor in graphics mode. One convention is an old standard of changing the background color. Another cursor type is a thin vertical line. More recently, with the advent of icons and mouse-based interfaces, the cursor is in the form of an arrow or other symbol, which the user may point to a desired area of the screen.
Most graphics systems provide software for drawing a cursor by means of a shape table or raster, which is a rectangular pattern of bits that can be referenced and manipulated as one unit. These shapes are usually defined as a two-dimensional array of type boolean, so that a true value will cause a corresponding pixel to illuminate and a false value will cause that pixel to be turned off. In color displays, this two-dimensional array can consist of multiple bit data types. The cursor is moved about the screen by first erasing it from its previous location and then drawing it at its new location.
In interactive graphics, an important consideration is interference between the cursor and the graphics drawing functions. If a shape is to be drawn on the screen, the desired effect is to have the drawing occur without seeming to disrupt the cursor. In other words, the drawing routine should not overwrite the cursor. Meanwhile, the cursor's background must be saved in case a cursor-free picture is needed for a purpose other than screen display, such as for printing or storage for future use.
Many graphics systems require a programmer to insert special programming for excluding the cursor, into each graphics routine. For example, a polygon drawing routine must determine if the cursor is located in the region where the polygon is to be drawn. If so, the cursor must be removed from the screen memory. The polygon is then drawn, the cursor restored, and the background saved in offscreen memory. A disadvantage of this method of cursor handling is the inconvenience to the programmer of writing the cursor handling code. Another disadvantage is a flickering effect of the cursor because the cursor is not in screen memory when the lines where it would otherwise be are scanned.
Another method of cursor handling uses a computer interrupt on the scan line that coincides with the top of the cursor. An interrupt service routine places the cursor in screen memory during the time it is actually displayed, and during this time, saves the background in offscreen memory. A disadvantage of this method is that during the time the cursor is displayed, the interrupt function prevails and no other functions can be performed.
Thus, a need exists for a cursor handling method that does not require substantial programming effort and minimizes disruption of other system operations.